﻿using Cofe.Core.Interfaces;
using Cofe.Core.Property;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace Cofe.Core.Actions
{
    /// <summary>
    /// Called by EntryFE to transfer the contents of Entry C from point A to point B.
    /// The transfer method based on transfer mode, it may be move, copy or link.
    /// </summary>
    public interface ITransferHelper : ICofeService
    {
        TransferMode GetSupportedMode(ICofeSystemInfo[] entries, ICofeDirectoryInfo fromm, ICofeDirectoryInfo too);

        /// <summary>
        /// Copy, Move or Link entry to too.
        /// </summary>
        Task<TransferMode> TransferAsync
            (TransferMode mode, ICofeSystemInfo[] entries, ICofeDirectoryInfo fromm, ICofeDirectoryInfo too, 
            IProgress<ProgressEventArgs> progress, CancellationToken cts);

        /// <summary>
        /// Rename entry to newName.
        /// </summary>        
        Task<TransferMode> RenameAsync
            (TransferMode mode, ICofeSystemInfo entries, ICofeDirectoryInfo fromm, string newName,
            IProgress<ProgressEventArgs> progress, CancellationToken cts);

        IEntryConstructor EntryConstructor { get; set; }
        ITransferHelper[] AllHelpers { get; set; } //Set when inport to CofeServices.
    }
}
